package com.junlong0716.enjoylearning.adapter

import android.widget.RadioButton
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.junlong0716.enjoylearning.R
import com.junlong0716.enjoylearning.entity.ClassifyEntity

/**
 *@author: 巴黎没有摩天轮Li
 *@description:
 *@date: Created in 下午11:26 2018/6/29
 *@modified by:
 */
class KnowledgeTypeAdapter(data: ArrayList<ClassifyEntity.DetailsBean>, resLayout: Int) : BaseQuickAdapter<ClassifyEntity.DetailsBean, BaseViewHolder>(resLayout, data) {
    override fun convert(helper: BaseViewHolder?, item: ClassifyEntity.DetailsBean?) {
        helper!!.getView<RadioButton>(R.id.radioButton).isChecked = item!!.selected
        helper.setText(R.id.tv_type_name, item.classifyName)
    }
}